package com.pactera.madp.cp.api.entity.medium;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pactera.madp.cp.api.entity.BaseEntity;
import com.pactera.madp.cp.api.validation.ToolInterface;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @description:素材库
 */
@TableName("cp_medium")
@ApiModel(value = "素材库")
@Data
@EqualsAndHashCode(callSuper = false)
public class MediumEnyity extends BaseEntity<MediumEnyity>{

    @TableId(value = "id", type = IdType.AUTO)
    @NotNull(message = "素材ID不能为空")
    private Integer id;

    @ApiModelProperty(value = "素材媒体标识[有效期3天]")
    private String mediaId;//素材媒体标识[有效期3天]

    @ApiModelProperty(value = "上一次微信素材上传的时间戳")
    private Integer lastUploadTime;//L上一次微信素材上传的时间戳

    @ApiModelProperty(value = "类型 1文本、2图片、3音频、4视频、5小程序、6文件素材")
    @NotNull(groups = {ToolInterface.mediumStore.class},message = "类型不能为空")
    private Integer type;//类型 1文本、2图片、3音频、4视频、5小程序、6文件素材

    @ApiModelProperty(value = "具体内容")
    @NotNull(groups = {ToolInterface.mediumStore.class},message = "内容不能为空")
    private String content;//具体内容:

    @ApiModelProperty(value = "企业ID")
    private Integer corpId;//企业表ID

    @ApiModelProperty(value = "素材分组ID")
    @NotNull(groups = {ToolInterface.mediumStore.class},message = "素材分组ID不能为空")
    private Integer mediumGroupId;//素材分组ID

    @ApiModelProperty(value = "上传者ID")
    private Integer userId;//上传者ID

    @ApiModelProperty(value = "上传者名称")
    private String userName;//上传者名称


    @ApiModelProperty(value = "是否同步素材库(1-同步2-不同步，默认:1)")
    private Integer isSync;

    @ApiModelProperty(value = "标题")
    private String collectionTitle;

}
